<?php
class ActionBar extends CWidget {
	/*
		id:
		menuAlign :(left,right,center)
		items:(array)
			item:
				id:
				title:
				icon: 
				size:
				showTitle: true
				callback: function
				
			
	*/
	
	public $id;
	public $menuAlign = "right";
	public $items;
	
	private $defItems = array("menuAlign" => "right");
	
	private $defItem = array(
		"id" =>"",
		"title"=>"",
		"icon"=>"",
		"size"=>25,
		"showTitle"=>true,
		"callback"=>"",
		"hidden"=>false
	);
	
	public function init(){
		//merge item
		for ($i =0;$i<count($this->items);$i++){
			$item = $this->items[$i];			
			$this->items[$i] = array_merge($this->defItem,$item);
		}
		
		
		
	}
	
    public function run() {
		$this->render('actionBar');
    }
}
?>